package mall

import (
	"e_mall_server/service"
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
)

/**
 * @Author: zhaobin
 * @Description TODO
 * @Date: 2022-05-13 17:01
 */

// GetCarouselList 获取轮播图列表接口
func GetCarouselList(c *gin.Context) {
	carouselList, err := service.GetCarouselList(map[string]interface{}{"status": 1})
	if err != nil {
		zap.L().Error("service.GetCarouselList() failed", zap.Error(err))
		ResponseError(c, "查询轮播图列表失败")
		return
	}
	zap.L().Debug("轮播图数据", zap.Any("value", carouselList))
	ResponseSuccess(c, carouselList)
}
